#!/usr/bin/env bash
set -e
cd "${0%/*}/.."
export TIME="  TIME: \t%E\n  CPU:  \t%P\n  MEM avg/max: \t%t/%M\n  FS I/O: \t%I/%O\n  pfaults M/m: \t%F/%R"

for ALG in {ECTS,RelClass,ECDIRE,SR-CF}; do
	echo "TEST:   $ALG"
	pushd algorithms/$ALG > /dev/null && env time ./test  && echo "PASSED: $ALG" || echo "FAILED: $ALG"
	popd > /dev/null
done

# integreation test
MultiETSC/main --dataset test/data/Coffee_TRAIN.tsv  --test test/data/Coffee_TEST.tsv --timeout 60 --cutoff 1
